const baseUrl ="https://api.tf2sc.cn/api/tfcar/";

function request (path,data) {
  return new Promise(resolve =>{
     uni.request({
       url: path,
	   header:{
		   "PlatformType":"h5"
	   },
       data,
       success:res=>{
         resolve(res)
       }
     })
  })
}
// 便捷选车
const getSongs = data =>request(baseUrl+"car/convenient",data)
// 二手车
const twoHand =data =>request(baseUrl+"car/list",data)
// 新车
const newcarList =data =>request(baseUrl+"newCar/list",data)
// 新闻咨讯
const getnews = data =>request(baseUrl+"website/indexNews",data)
// 城市列表
const getCity =data =>request(baseUrl+"city/treeList",data)
// 二手车动态请求
const getCar =data =>request(baseUrl+"car/list",data)
// 服务数据
const getWuj =data =>request(baseUrl+"website/tengfaService",data)
export{
	getSongs,
	twoHand,
	newcarList,
    getnews,
	getCity,
	getCar,
	getWuj,
}

